package com.dl.dw;

import android.app.Application;
import android.util.Log;

import com.dl.dw.vo.QuestionVO;
import com.getkeepsafe.relinker.ReLinker;
import com.tencent.mmkv.MMKV;

import java.util.ArrayList;
import java.util.List;


public class App extends Application {

    private static App instance;

    public static App getInstance() {
        return instance;
    }

    public List<QuestionVO> questionVOS=new ArrayList<>();
    public List<QuestionVO> questionVOS2=new ArrayList<>();


    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;

        FinalCrashHandler crashHandler = FinalCrashHandler.getInstance();
        // 注册crashHandler
        crashHandler.init(this);
        //缓存初始化
        String dir = getFilesDir().getAbsolutePath() + "/mmkv";
        MMKV.initialize(dir, new MMKV.LibLoader() {
            @Override
            public void loadLibrary(String libName) {
                ReLinker.loadLibrary(App.this, libName);
            }
        });
    }
}
